package com.wish.demo;

import java.util.HashMap;
import java.util.Map;

public class Demo {
    public static void main(String[] args) {
        String str1 = new String("123");
        String str2 = new String("123");

        String str3 = "123";
        String str4 = "123";

        System.out.println(str1 == str2);
        System.out.println(str3 == str4);

        Map<String, Object> map1 = new HashMap<>();
        map1.put(str1,1);
        map1.put(str2,1);

        System.out.println(map1.size());

        Map<String, Object> map2 = new HashMap<>();
        map2.put(str1,1);
        map2.put(str3,1);
        System.out.println(map2.size());
    }
}
